class Solution
{
public:
    int prefixCount(vector<string> &words, string pref)
    {
        int prefSize = pref.size();
        int result = 0;
        for (string_view s : words)
        {
            if (s.size() >= pref.size() && s.substr(0, prefSize) == pref)
            {
                ++result;
            }
        }
        return result;
    }
};